#@head() 
#@header() 
#@aside("ticket")
<div class="content-wrapper">
	<section class="content" >
		<div class="row" >
			<div class="col-md-12">
				<div class="box box-info">
					<div class="box-header with-border" style="padding-left:20px;">
						<h3 class="box-title">工单进度</h3>
					</div>
					<div class="table-responsive" style="padding-left:20px;">
						<table class="table">
							<tr>
								<th >客户姓名</th>
								<td>#(ticket.getClient().realname)</td>
							</tr>
							<tr>
								<th>客户号码</th>
								<td>#(ticket.phone)</td>
							</tr>
							<tr>
								<th>问题内容</th>
								<td>#(ticket.description)</td>
							</tr>
							<tr>
								<th>创建日期</th>
								<td>#(date.stampToDate(ticket.createtime??"1"))</td>
							</tr>
							<tr>
								<th>跟单人</th>
								<td>#(ticket.getFollower().realname)</td>
							</tr>
							<tr>
								<th>派单人</th>
								<td>#(ticket.getAssigner().realname)</td>
							</tr>
							<tr>
								<th>完结人</th>
								<td>#(ticket.getFinisher().realname)</td>
							</tr>
							#if(ticket.results1!=null)
							<tr>
								<th>工单进度</th>
								<td>#(ticket.results1)</td>
							</tr>
							#end
							#if(ticket.results2!=null)
							<tr>
								<th>完结信息</th>
								<td>#(ticket.results2)</td>
							</tr>
							#end
						</table>
					</div>
					#if(type??!="view")
					<div class="box-footer">
						<div class="input-group margin">
							<input type="text" class="form-control" id="results" placeholder="请输入工单跟踪信息！"> 
							<span class="input-group-btn">
								<button  class="btn btn-info btn-flat">提交</button>
							</span>
						</div>
					</div>
					#end
				</div>
			</div>
		</div>
	</section>
</div>


#@footer()
<script>
$(document).ready(function() {
	$(".btn-flat").click(function() {
		var id = $(this).data("id");
		layer.confirm('确认提交？', {btn : [ '确定', '取消' ]}, function() {
			ajax("#(path)/ticket/startProcess",{"id":#(ticket.id),"step":#(ticket.step),"results":$("#results").val()},function(data){
				layer.msg(data.msg, {icon:data.type},function(){
					location.href="#(path)/ticket/handle"
				});
			});
		}, function() {
			layer.msg('已取消', {
				icon : 1
			});
		});
	});
});
</script>
</body>
</html>